home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 …ember: Reference Library / Dev.CD Dec 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 26 / develop issue 26 code / truffles - display mgr. / sprocket / experimentalstuff / documentwindow.cp < prev    next >
Encoding:
Text File  |  1996-01-02  |  863 b   |  50 lines

  1. /*
  2.     File:        DocumentWindow.cp
  3.  
  4.     Contains:    An abstract base class for document-backed windows
  5.                 
  6.     Written by: Dave Falkenburg
  7.     
  8.     Copyright:    © 1994-95 by Dave Falkenburg, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.      
  12.          <1>      1/3/95    DRF        First checked in.
  13.  */
  14.  
  15. #include "DocumentWindow.h"
  16.  
  17. TDocumentWindow::TDocumentWindow(TDocument *backingDocument)
  18.     {
  19.     fDocument = backingDocument;
  20.     }
  21.  
  22.  
  23.  
  24. void
  25. TDocumentWindow::Activate(Boolean activating)
  26.     {
  27.     //    Make sure we keep the document list in the same order as the windowlist
  28.     
  29.     if (activating)
  30.         fDocument->BringDocumentToFront();
  31.  
  32.     //    Should really add activation routines for enabling/disabling menus
  33.  
  34.     }
  35.  
  36.  
  37.  
  38. Boolean
  39. TDocumentWindow::Close()
  40.     {
  41.     return fDocument->Close(false);
  42.     }
  43.  
  44.  
  45. Boolean
  46. TDocumentWindow::DoMenuCommand(MenuCommandID menuCommand)
  47.     {
  48.     return fDocument->DoMenuCommand(menuCommand);
  49.     }
  50.